<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ include file="../Main/top.jsp"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<script type="text/javascript" src="Course.js"></script>
<script type="text/javascript" >
$(document).ready( function() {
	var isPublic = ${course.isPublic};
	var courseCateId = ${course.courseCateId}
	initForm("update",isPublic,courseCateId);
	isPublicClick();
});
</script>
<div class="function_title"><span class="t2"><img src="../images/dqwz.gif">当前位置：编辑课程信息</span></div>
<div class="function_content">
<div class="addItem"><img src="../images/return_icon.png"><a href="listCourse.action?intercept=1">返回列表</a></div>
<span class="important_info">注：带*项为必填信息!</span>
<form action="updateCourse.action" method="post" id="demo">
<s:hidden name="course.courseId"></s:hidden>
   <table width="100%" border="0" cellpadding="0" cellspacing="0" class="loginTable">
	<tr>
      <td align="right" class="leftBg"><span class="important_info">*</span>课程名称：</td>
	<td><s:textfield name="course.courseName" id="course.courseName"></s:textfield><span class="important_info">*</span></td>
    </tr>
<tr id="isPublicLine">
      <td align="right" class="leftBg"><span class="important_info">*</span>是否为公共课程：</td>
      <td>
<s:if test="%{course.isPublic==1}">
<input type="radio" name="course.isPublic" value="1" class="no_border" id="isPublic1" checked="checked">是
<input type="radio" name="course.isPublic" value="0" class="no_border" id="isPublic0">否
</s:if>
<s:elseif test="%{course.isPublic==0}">
<input type="radio" name="course.isPublic" value="1" class="no_border" id="isPublic1" >是
<input type="radio" name="course.isPublic" value="0" class="no_border" id="isPublic0" checked="checked">否
</s:elseif>
<span id="errMsg"></span>
	  </td>
    </tr>        
<tr id="majorLine">
      <td width="15%" align="right" class="leftBg"><span class="important_info">*</span>所属专业：</td>
      <td ><s:select list="preInsert"  listValue="majorName" listKey="majorId"  name="course.majorId" id="majorId"
headerKey="" headerValue="--未选择--" value="%{course.majorId}" ></s:select>
</td>
	</tr>
	    <tr>
      <td  align="right" class="leftBg"><span class="important_info">*</span>所属课程分类：</td>
      <td >
      <select name="course.courseCateId" id="courseCateId">
			<option value="">--未选择--</option>
	  </select>
		</td>
    </tr>

	<tr>
      <td align="right" class="leftBg">课程描述：</td>
		<td><s:textarea name="course.courseMark" rows="5" cols="60" id="course.courseMark"></s:textarea></td>
    </tr>
    <tr>
 	  <td align="right">&nbsp;</td>
      <td>
        <input type="submit" name="submit" id="submit" value="提交" class="deal_button">
        <input type="reset" name="reset" id="reset" value="重置" class="deal_button">
      </td>
    </tr>
  </table>
</form>
</div>
<%@ include file="../Main/bottom.jsp"%>
